rust-lang/rust#19253 and rust-lang/rust@
25f8051 have introduced changes
to the namespacing within the std::collections::hash_map, breaking some
of Cargo code which imported these.
rust-lang/rust@
cf350ea, implementing changes proposed by RFC #344, have
also broken some code which relies on hash_set::SetItems (now renamed to
hash_set::Iter).
This commit fixes the incompatibilities: imports of
std::collections::hash_map::{Occupied, Vacant} have been replaced by
imports of std::collections::hash_map::Entry::{Occupied, Vacant} and one
instance where the SetItems has been used was replaced by the proper
usage of Iter.
use std::collections::HashSet;
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
use core::{Source, SourceId, SourceMap, Summary, Dependency, PackageId, Package};
use util::{CargoResult, ChainError, Config, human, profile};
use std::cell::RefCell;
use std::collections::HashSet;
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::fmt;
use std::rc::Rc;
use semver;
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::str;
use std::sync::Arc;
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::hash::{Hash, Hasher};
use std::hash::sip::SipHasher;
use std::io::{mod, fs, File, BufferedReader};
use std::collections::HashSet;
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::sync::TaskPool;
use term::color::YELLOW;
use std::{fmt, os, mem};
use std::cell::{RefCell, RefMut};
-use std::collections::hash_map::{HashMap, Occupied, Vacant};
+use std::collections::hash_map::{HashMap};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::io;
use std::io::fs::{mod, PathExtensions, File};
use std::string;
//! This structure is used to store the dependency graph and dynamically update
//! it to figure out when a dependency should be built.
-use std::collections::{HashMap, HashSet};
-use std::collections::hash_map::{Occupied, Vacant};
+use std::collections::hash_set::HashSet;
+use std::collections::hash_map::HashMap;
+use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::hash::Hash;
pub use self::Freshness::{Fresh, Dirty};
use std::fmt;
use std::hash::Hash;
-use std::collections::{HashMap, HashSet};
-use std::collections::hash_map::{Keys, Occupied, Vacant};
-use std::collections::hash_set::SetItems;
+use std::collections::hash_set::HashSet;
+use std::collections::hash_map::{HashMap, Keys};
+use std::collections::hash_map::Entry::{Occupied, Vacant};
+use std::collections::hash_set::Iter;
pub struct Graph<N> {
nodes: HashMap<N, HashSet<N>>
}
pub type Nodes<'a, N> = Keys<'a, N, HashSet<N>>;
-pub type Edges<'a, N> = SetItems<'a, N>;
+pub type Edges<'a, N> = Iter<'a, N>;
impl<N: Eq + Hash + Clone> Graph<N> {
pub fn new() -> Graph<N> {